package com.itheima.tliasmanager.mapper;

import com.itheima.tliasmanager.pojo.domain.Clazz;
import com.itheima.tliasmanager.pojo.Dto.QueryParam;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ClazzMapper {

    List<Clazz> queryPageList(QueryParam queryParam);

    @Select("select * from clazz;")
    List<Clazz> listAllClazz();

    void addClazz(Clazz clazz);

    @Delete("delete from clazz where id = #{id};")
    void removeById(Integer id);

    Clazz findById(Integer id);

    void updateClazz(Clazz clazz);

}
